// 搜索
export const searchTopEleForm = [
    { type: 'input', name: 'ID', prop: 'id', },
    { type: 'input', name: '名称', prop: 'name', },
    { type: 'input', name: '最大比特速率', prop: 'biggestBitRate', },
    { type: 'input', name: '最小比特速率', prop: 'smallestBitRate', },
    { type: 'input', name: '监控IP', prop: 'ip', }
]

// 弹出框操作
const deviceTypeOptions = [
    { label: '通道1', value: 'demodulator-channel-high-rate-double-channel-rw1' },
    { label: '通道2', value: 'demodulator-channel-high-rate-double-channel-rw2' },
]

const ipRule = /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/
export const DialogEleForm = [
    { type: 'select', name: '通道', prop: 'deviceType', options: deviceTypeOptions },
    { type: 'input', name: 'ID', prop: 'id', },
    { type: 'input', name: '名称', prop: 'name', },
    { type: 'input', name: '最大比特速率', prop: 'biggestBitRate', },
    { type: 'input', name: '最小比特速率', prop: 'smallestBitRate', },
    {
        type: 'input', name: '监控IP', prop: 'ip', rules: [
            { pattern: ipRule, message: '请输入正确的IP地址' }
        ]
    }
]